package org.dromara.answer.domain.bo;

import org.dromara.answer.domain.AiExams;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 考试/测验业务对象 ai_exams
 *
 * @author Lion Li
 * @date 2025-04-09
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = AiExams.class, reverseConvertGenerate = false)
public class AiExamsBo extends BaseEntity {

    /**
     * 考试ID，主键
     */
    @NotNull(message = "考试ID，主键不能为空", groups = { EditGroup.class })
    private Long examId;

    /**
     * 考试标题
     */
    @NotBlank(message = "考试标题不能为空", groups = { AddGroup.class, EditGroup.class })
    private String title;

    /**
     * 考试描述
     */
    @NotBlank(message = "考试描述不能为空", groups = { AddGroup.class, EditGroup.class })
    private String description;

    /**
     * 开始时间
     */
    @NotNull(message = "开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date startTime;

    /**
     * 结束时间
     */
    @NotNull(message = "结束时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date endTime;

    /**
     * 考试时长（分钟）
     */
    @NotNull(message = "考试时长（分钟）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long duration;

    /**
     * 总分值
     */
    @NotNull(message = "总分值不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long totalScore;

    /**
     * 及格分数
     */
    @NotNull(message = "及格分数不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long passScore;

    /**
     * 状态：0-禁用，1-启用
     */
    @NotNull(message = "状态：0-禁用，1-启用不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer status;

    /**
     * 题目数量
     */
    private Integer questionCount;

    private List<AiExamQuestionsBo> examQuestions;
}
